//
//  SearchTopBar.swift
//  Motion
//
//  Created by 悦月越悦 on 2021/3/8.
//

import SwiftUI

struct SearchTopBar: View {
    
    @Binding var presentSearchPage : Bool
    
    var body: some View {
        ZStack{
            HStack{
                Spacer()
                Text("搜索课程")
                    .foregroundColor(Color.white)
                    .customFont(20, true)
                Spacer()
            }
            HStack{
                Button(action: {
                    self.presentSearchPage = false
                }){
                Image(systemName: "chevron.backward")
                    .foregroundColor(.white)
                    .customFont(16, true)
                }
                Spacer()
            }
            .padding(.horizontal,10)
        }
        .frame(height:50)
        .background(Color(("topicPurple")))
    }
}

struct SearchTopBar_Previews: PreviewProvider {
    static var previews: some View {
        SearchTopBar(presentSearchPage: .constant(false))
    }
}
